package com.linhngua.code.xml;

import javax.xml.transform.ErrorListener;
import javax.xml.transform.TransformerException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class PrintErrorListener implements ErrorListener {
	
	public static PrintErrorListener	INSTANCE	= new PrintErrorListener();
	
	private static final Logger			LOG			= LoggerFactory.getLogger(PrintErrorListener.class);
	
	public void error(TransformerException arg0) throws TransformerException {

		LOG.error("ERROR: " + arg0.getMessage());
	}
	
	public void fatalError(TransformerException arg0)
			throws TransformerException {

		LOG.error("FATAL: " + arg0.getMessage());
	}
	
	public void warning(TransformerException arg0) throws TransformerException {

		LOG.error("WARNING: " + arg0.getMessage());
	}
	
}
